{% extends "base.html" %}
{% block title %}Ver Relaciones{% endblock %}
{% block body %}
  <h2>Ver Relaciones</h2>
  {% if error %}<div class=error><strong>Error:</strong> {{ error }}</div>{% endif %}
  <form action="" method=post>
      <table>
          <TR>
              <TD><input type=submit name="action" value="Agregar Antecesor"></TD>
              <TD><input type=submit name="action" value="Agregar Padre"></TD>
              <TD><input type=submit name="action" value="Eliminar"></TD>
              <TD><button type=submit name="action" value=Salir>Regresar</button></TD>
          </TR>
      </table>
      <br>
      <table>
          <TR>
              <TD>Seleccionar</TD>
              <TD>Item Origen</TD>
              <TD>Item Destino</TD>
          </TR>
          {% for item in items %}
          <TR>
            <td><input type=checkbox name=seleccionados value="{{ item.id }}"></td>
            <TD class="c1">{{item.origen}}</TD>
            <TD class="c2">{{item.destino}}</TD>
          </TR>
          {% endfor %}
      </table>
    </form>
{% endblock %}
